﻿using System;

namespace Awesome.Extensions.Disposable
{
    public static class DisposableEx
    {
        public static void SafeDispose(this IDisposable disposable)
        {
            if (disposable != null)
            {
                try
                {
                    disposable.Dispose();
                }
                catch (ObjectDisposedException exc)
                {
                    /* supress */
                }
            }
        }

    }
}
